home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / polminet / piotr_pawîow / mapatch27->28 / patch.install < prev    next >
Text File  |  1997-04-07  |  1KB  |  51 lines

  1. ; MiniArcanoid Installer script
  2.  
  3. (procedure P_PATCHFILE #old #new #patch
  4.   (
  5.     (set #err
  6.       (run ("patch \"%s\" \"%s\" \"%s\" QUIET" #old #new #patch)) 
  7.     )
  8.     (if (<> #err 0)
  9.       (abort
  10.         (select (- #err 10)
  11.           "Not enough memory"
  12.           "Read error"
  13.           "Wrong version of patch command\nor something strange has happened"
  14.           "*** BREAK ***"
  15.           ("Couldn't write file \"%s\"" #new)
  16.           ("Wrong \"%s\" file format" #patch)
  17.           ("Wrong \"%s\" file size.\nProbably it's incorrect version." #old)
  18.           ("Wrong \"%s\" file checksum.\nProbably the file has been altered." #old)
  19.         )
  20.       )
  21.     )
  22.   )
  23. )
  24.  
  25. (welcome)
  26.  
  27. (set #destdir
  28.     (askdir
  29.         (prompt "Select where are your MiniArcanoid files")
  30.         (help @askdir-help)
  31.         (default @default-dest)
  32.     )
  33. )
  34.  
  35. (set #destexe (tackon #destdir "MiniArcanoid"))
  36. (set #destguide (tackon #destdir "MiniArcanoid.guide"))
  37.  
  38. (working "Installing patches...")
  39. (if
  40.   (not (exists #destexe))
  41.   (abort "MiniArcanoid executable not found!")
  42. )
  43. (P_PATCHFILE #destexe #destexe "MiniArcanoid.pch")
  44.  
  45. (if
  46.   (not (exists #destguide))
  47.   (abort "MiniArcanoid guide file not found!")
  48. )
  49. (P_PATCHFILE #destguide #destguide "MiniArcanoid.guide.pch")
  50. (exit)
  51.